package org.linlinjava.litemall.db.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@ApiModel("秒杀商品")
public class LitemallSeckill {

    @ApiModelProperty("id")
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    @ApiModelProperty("商品id")
    private Integer goodId;

    @ApiModelProperty("秒杀数量")
    private Integer number;

    @ApiModelProperty("初始化被秒杀数量")
    private Integer initialNumber;

    @ApiModelProperty("秒杀价格")
    private BigDecimal killPrice;

    @ApiModelProperty("排序")
    private Byte sortOrder;

    @ApiModelProperty("开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty("结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("是否删除")
    private Boolean deleted;

}